package com.cbts.service.person;

import java.util.List;

import com.cbts.entity.ExchangeRecord;
import com.cbts.entity.ExchangeRecordId;
import com.cbts.entity.Gift;
import com.cbts.entity.UserInfo;
/**
 * @author 邱鸿辉
 *
 */
public interface ExchangeService {

	/**
	 * 增加兑换记录
	 * @param exchangeRecord 兑换记录
	 * @return 成功增加兑换记录则返回true，否则返回false
	 */
/*	public boolean addExchangeRecord(ExchangeRecord exchangeRecord);*/
	//public ExchangeRecord getExchangeRecord(int id);
	/*public boolean exchangeMoney(double money,UserInfo userInfo);*/
	/**
	 * 进行点数兑换
	 * @param gift 物品
	 * @param count 要兑换的数量
	 * @param userInfo 员工
	 * @return 返回进行点数兑换的结果
	 */
	public String exchange(Gift gift,int count,UserInfo userInfo);
	/**
	 * 获取全部的兑换记录
	 * @return 全部兑换记录
	 */
	public List<ExchangeRecord> getAllExchangeRecord();
	/**
	 * 根据员工号获取员工的兑换记录
	 * @param userid 员工号
	 * @return 员工的兑换记录
	 */
	public List<ExchangeRecord> getExchangeRecordByUserid(String userid);
	/**
	 * 根据兑换记录主键获取兑换记录
	 * @param exchangeRecordId 兑换记录主键实体
	 * @return 兑换记录
	 */
	public ExchangeRecord getExchangeRecord(ExchangeRecordId exchangeRecordId);
	/**
	 * 修改兑换记录
	 * @param exchangeRecord 兑换记录
	 * @return 修改兑换成功则返回true，否则返回false
	 */
	public boolean updateExchangeRecord(ExchangeRecord exchangeRecord);
}
